In this paper we present a new mathematical model for the density regions where a specific spectral line and its SACs/DACs are created in the Oe and Be stellar atmospheres. In the calculations of final spectral line function we consider that the main reasons of the line broadening are the rotation of the density regions creating the spectral line and its DACs/SACs, as well as the random motions of the ions. This line function is able to reproduce the spectral feature and it enables us to calculate some important physical parameters, such as the rotational, the radial and the random velocities, the Full Width at Half Maximum, the Gaussian deviation, the optical depth, the column density and the absorbed or emitted energy. Additionally, we can calculate the percentage of the contribution of the rotational velocity and the ions' random motions of the DACs/SACs regions to the line broadening. Finally, we present two tests and three short applications of the proposed model.